$(function(){
	showCondition(true,0,0,1,[]);
	var param=drgUI.setAjaxData(tabId);
	$.post(contextPath + "/mrQualityAnalysis/getGroupCaseQuality.dhc", param).done(function(res){
		var data=res.data;
		var paramsDataTables={
				lengthChange:true,
				ordering:true,
				scrollX:true,
				scrollY:'500px',
				pageLength:20,
				order:[[5, "desc"]],
				fixedColumns:{'leftColumns' :1}
		};
		var columns=[ 
						{ "data": "DRG","title":"DRG代码及描述",
							"render": function(obj, type, full){
								if(null == full.DRG_DESC){
									full.DRG_DESC = "";
								}
								return "<a href=\"javascript:drgGroupDetail('"+param.dateFrom+"','"+param.dateTo+"', '"+full.PARDRG_CODE+"','"+full.DRG_DESC+"', '"+full.AS_AVG_FEE+"')\">"+full.PARDRG_CODE+"-"+full.DRG_DESC+"</a>";
							 }
						},
						{ "data": "AS_WEIGHT","title":"病组权重"},
						{ "data": "CASECNT","title":"病例数"},
						{ "data": "AVGFEE","title":"次均费用"},
						{ "data": "AS_AVG_FEE","title":"标杆费用"},
						{ "data": "CVFEE","title":"费用变异系数"},
						{ "data": "COMMONDISPCASECNT","title":"一般离散病例数"},
						{ "data": "HIGHDISPCASECNT","title":"高离散病例数"},
						{ "data": "AVG_DAY","title":"平均住院日"},
						{ "data": "AS_AVG_DAYS","title":"标杆住院日"},
						{ "data": "CVDAY","title":"住院日变异系数"}
	                 ];
		var table = $('#'+tabId+' #caseTable').dataTableBasic(columns,data,paramsDataTables);
	});
});
/**
 * 
 * @ Discription:特定病组的具体分析
 * @Autor ：mazhaoyan
 * @param dateFrom
 * @param dateTo
 * @param drgCode
 * void
 * mrGroupQualityAnalysis.js
 * 2017年7月20日下午9:47:35
 */
function drgGroupDetail(dateFrom,dateTo,drgCode,drgDesc,as_avg_fee){
	openTab('/pages/yizheng/fenxi/drgGroupDetailPage.jsp',drgCode+'|病组详细', 'drgGroupDetail'+drgCode,'drgGroupDetail'+drgCode,{dateFrom:dateFrom,dateTo:dateTo,drgCode:drgCode,drgDesc:drgDesc,as_avg_fee:as_avg_fee});
}
